<?php
/*
 * Created on 24/08/2007
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
?>
<?php use_helper('Object', 'Validation', 'ObjectAdmin', 'I18N', 'Date') ?>
 <?php use_helper('Javascript')?>
  <?php use_helper('Javascript','Object')?>
<?php echo javascript_include_tag('ajax') ?>
<?php use_stylesheet('/sf/sf_admin/css/main') ?>
      <table width="600" border="0" align="center" id="externa">
        <tr>
          <td valign="top">
             <?php echo form_tag('solicitarcitas/edit') ?>

              <table width="500" height="335" border="0" align="center">
                <tr bgcolor="#e1e1e1">
                  <td bgcolor="#e1e1e1" height="10" colspan="4" class="estilo1">Datos Personales</td>
                  <td height="15" colspan="2"></td>
                </tr>
                <?
         			$id_est  = $sf_user->getAttribute('idsesion');
         			$objUsu = AteneausuarioPeer::retrieveByPk($id_est);
         			$urlfoto = $objUsu->getUrlFoto();
         			//$email = $objUsu->getEmail();
         			$objCita = new Cita();
         			$ced     = $objCita->getCedulaEstudianteConId($id_est);
         			$objEstudiante = new Estudiante();
         			$datos = $objEstudiante->getDatosDelEstudianteConCed($ced);
         			$n = $datos->getNombre();
         			$a = $datos->getApellido();
         			$c = $datos->getCedula();
         			$t = $datos->getTelefonoCelular();
         			$objDatoEstudiante = $datos->getObjDatoEstudiante();
         			$e = $objDatoEstudiante->getEmailAlterno();

      				?>
                <tr align="left">
                  <td height="15" colspan="2">&nbsp;&nbsp;</td>

                  <td width="40" rowspan="5" align="center">
                  <fieldset border="2" width="20">
                  <?php echo input_hidden_tag('getId') ?>
                  <?php echo input_hidden_tag('solicitante_id','2') ?>
                  <?php echo image_tag('/uploads/fotos/'.$urlfoto, 'alt=imagen size=90x100') ?>
                  </fieldset>
                  </td>
                </tr>
                <tr align="left">
                  <td height="25">C&eacute;dula:</td>
                  <td height="25" colspan="2">
                    <?echo $c?>

                </tr>
                <tr align="left">
                  <td height="25">Nombre:</td>
                  <td height="25" colspan="2">
                    <?echo $n?>
                  </td>
                </tr>
                <tr align="left">
                  <td height="11">Apellido:</td>
                  <td height="25" colspan="2"><?echo $a?></td>
                </tr>
                <tr align="left">
                  <td height="28">Tel&eacute;fono:</td>
                  <td height="25" colspan="2"><?echo $t?></td>
                </tr>
                <tr>
                  <td height="10">Email:</td>
                  <td height="10" colspan="3"><?echo $e?></td>
                </tr>
                <tr>
                  <td height="10"></td>
                  <td height="10" colspan="3"></td>
                </tr>
                <tr bgcolor="#e1e1e1">&nbsp;
                  <td height="10" colspan="4" class="estilo1">Datos De Solicitud</td>
                </tr>
               <tr>
                 <td colspan="3">

					<?php include_partial('solicitarcitas/edit_messages') ?>

                  </td>
                </tr>
                <tr>
                  <td height="10"></td>
                  <td height="10" colspan="0"></td>
                </tr>
                <tr>
                  <td height="28">Fecha:</td>
                  <td width="25">
                   <? echo input_date_tag('fech',date('Y-m-d'),array('rich' => 'true')) ?>
                  </td>


                </tr>
                <tr>
                   <td width="25">Especialidad:</td>
                  <td>

                  <?
                    $r= $sf_flash->get('r');
                    $objsRol = new Rol();
                    $roles = $objsRol->getRolesDeEspecialistas();
          			$this->especialidades = $roles;
          			echo select_tag('rol',objects_for_select($this->especialidades,'getId','getDescripcion',$r),array(
					'onChange' => remote_function(array(
                    'update' => 'area_especialista',
                    'url' => 'solicitarcitas/especialistas',
                    'with' => "'ajax=1&rol='+this.value+'&fech='+fech.value"
          			))
          			));

            		?>

                  <td>

                    </tr>
       		   	   <tr id="area_especialista" clas="clase">
                   <td width="63">Especialistas:</td>
       		  	   <td colspan="6" >
			  		<?
      		  	    echo select_tag('especialista', array(
      		  	    '' => "Seleccione"
      		  	    ));
      		  	    ?>
            		  </td>
       	    	    </tr>
       	    	    <tr id="area_turno" class="clase" height="50">
       	    	    <td width="63">Turno:</td>
       	    	    <td>
			  		<?
      		  	    echo select_tag('turno',array(
      		  	        '' => 'Seleccione',
      		  	        ));
      		  	    ?>
            		</td>
                    <td>
            		<? ?>
            	    </td>
       	    	    </tr>

                 </td>

                </tr>

                  <tr id="area_horas" class="clase">
       	    	    <td width="63">Hora:</td>
       	    	    <td colspan="6">
			  		<?
      		  	    echo select_tag('bloque',array(
      		  	        '' => 'Seleccione',
      		  	        ));
      		  	    ?>
            		  </td>
       	    	    </tr>

                <tr>
                  <td height="28">Motivo de la Cita:</td>
                  <td colspan="3"><textarea name="motivo" cols="50" rows="2" wrap="VIRTUAL"></textarea></td>
                </tr>
                <tr>
                  <td height="28">Tipo de Cita:</td>
                  <?php if (($sf_params->get('rol') == 1) || ($sf_params->get('rol') == 2)){   ?>
                  <td><select name="tipo" onChange="MM_jumpMenu('parent',this,0)">
                      <option>Tipo de Cita</option>
                      <option selected>Exploratoria</option>
                      <option>Seguimiento</option>
                  </select></td>
                  <? } else {?>
                  <td><select name="tipo" onChange="MM_jumpMenu('parent',this,0)">
                      <option>Tipo de Cita</option>
                      <option selected>Asesoria</option>
                  </select></td>
                  
                  <? } ?>
                  <td id="sugerencias"></td>
                  <td>
                </tr>
                <tr>
                <td colspan="3" align="center">

				<?php echo submit_tag(__('Registrar'), array (
  				'name' => 'save',
  				'class' => 'sf_admin_action_save',
				)) ?>



				</td>
                </tr>
              </table>
              </form>

          </td>
         </tr>
      </table>
